<?php

namespace app\store\model;

use app\common\model\CommentImage as CommentImageModel;

/**
 * 商品图片模型
 * Class GoodsImage
 * @package app\store\model
 */
class CommentImage extends CommentImageModel
{
    public function add($comment_id, $images)
    {
        $data = [];
        foreach ($images as $val) {
            $data[] = [
                'comment_id' => $comment_id,
                'image_id' => $val,
                'wxapp_id' => static::$wxapp_id,
                'create_time' => time()
            ];
        }
        return $this->insertAll($data);
    }

}
